﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TB_CS.WeChat_Menu
{
    public partial class WeChat_Text : Form
    {
        public WeChat_Text()
        {
            InitializeComponent();
        }

        private void WeChat_Text_Load(object sender, EventArgs e)
        {
            DataSet WXR_DST = Class.SysInfo.WSSELLER.GET_WXR_INFO(
                Convert.ToInt32(Class.SysInfo.INFO_Seller_ID), "WX_Reply_Low");
            if (WXR_DST.Tables[0].Rows.Count == 0)
            {
                richTextBox1.Focus();
                
            }
            else
            {
                richTextBox1.Text = WXR_DST.Tables[0].Rows[0][3].ToString();
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            int RT_Num = Class.SysInfo.WSSELLER.UPDATE_WXR_INFO(
                Convert.ToInt32(Class.SysInfo.INFO_Seller_ID), "WX_Reply_Low",
                richTextBox1.Text.ToString());
            if(RT_Num==1)
            {
                MessageBox.Show("提交/更新 成功", "Success");
                this.Close();
            }
        }
    }
}
